﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:OMANE.Modules.PMT"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" mc:Ignorable="d"
	x:Class="WindowDetailTbleFlux"
	x:Name="Window"
	Title="WindowDetailTbleFlux"
	SizeToContent="Height" Width="450" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" Topmost="True">
	<Window.Resources>
		<local:TableStateToIconConverter x:Key="TableStateToIconConverter"/>
		<Style x:Key="ButtonStyleFermer" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderDefaulted="{TemplateBinding IsDefaulted}" SnapsToDevicePixels="true">
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Microsoft_Windows_Themes:ButtonChrome>
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true">
								<Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
							</Trigger>
							<Trigger Property="ToggleButton.IsChecked" Value="true">
								<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="#ADADAD"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
	<d:DataContext>
		<local:ViewModelFichierPMT/>
	</d:DataContext>

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<Grid Margin="15" d:LayoutOverrides="Height, VerticalMargin">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
				<RowDefinition Height="Auto" MinHeight="25"/>
			</Grid.RowDefinitions>
			<Grid Grid.ColumnSpan="2">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<Image OpacityMask="Black" HorizontalAlignment="Left" Source="{Binding FileIcon, Mode=OneWay}" VerticalAlignment="Center"/>
				<Border BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" BorderThickness="1" Margin="5,0,0,0" Grid.Column="1">
					<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Text="{Binding FileFullName, Mode=OneWay}" HorizontalAlignment="Left"/>
				</Border>
			</Grid>
			<Path Data="M80,56 L368,67" Fill="#FFF4F4F5" Grid.Row="1" Stretch="Fill" Height="1" VerticalAlignment="Top" Grid.ColumnSpan="2" Margin="0,15,0,0">
				<Path.Stroke>
					<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
				</Path.Stroke>
			</Path>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="2" Text="Existence du dossier :" Margin="0,0,5,0"/>
			<Image Grid.Column="1" HorizontalAlignment="Left" Grid.Row="2" Width="16" Height="16" Margin="0" Source="{Binding Exists, Converter={StaticResource TableStateToIconConverter}, Mode=Default}" VerticalAlignment="Center"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="3" Text="Existence du fichier :" Margin="0,0,5,0"/>
			<Image Grid.Column="1" HorizontalAlignment="Left" Grid.Row="3" Width="16" Height="16" Source="{Binding FileExists, Converter={StaticResource TableStateToIconConverter}, Mode=OneWay}" VerticalAlignment="Center" Margin="0"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Text="S'ouvre avec :" Grid.Row="4" Margin="0,0,5,0"/>
			<Path Data="M80,56 L368,67" Fill="#FFF4F4F5" Grid.Row="5" Stretch="Fill" Height="1" VerticalAlignment="Top" Grid.ColumnSpan="2" Margin="0,15,0,0">
				<Path.Stroke>
					<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
				</Path.Stroke>
			</Path>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Text="Taille :" Grid.Row="6" Margin="0,0,5,0"/>
			<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="0" Grid.Row="6" TextWrapping="Wrap" Text="{Binding FileLength, Mode=OneWay}" VerticalAlignment="Center"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Text="Créé le :" Grid.Row="7" Margin="0,0,5,0"/>
			<TextBlock Grid.Column="1" HorizontalAlignment="Left" Grid.Row="7" TextWrapping="Wrap" Text="{Binding FileCreationTime, Mode=OneWay}" VerticalAlignment="Center"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Text="Modifié le :" Grid.Row="8" Margin="0,0,5,0"/>
			<TextBlock Grid.Column="1" HorizontalAlignment="Left" Grid.Row="8" TextWrapping="Wrap" Text="{Binding FileLastWriteTime, Mode=OneWay}" VerticalAlignment="Center"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="9" Margin="0,0,5,0"><Run Text="Dernier Accès le :"/></TextBlock>
			<TextBlock Grid.Column="1" HorizontalAlignment="Left" Grid.Row="9" TextWrapping="Wrap" Text="{Binding FileLastAccessTime, Mode=OneWay}" VerticalAlignment="Center" Margin="-0.001,0,0,0"/>
		</Grid>
		<Border BorderBrush="Black" Grid.Row="1" Background="LightGray">
			<Button Content="Fermer" HorizontalAlignment="Right" Margin="0,3.5,3.5,3.5" MinWidth="80" Padding="3.5,2.5" Style="{DynamicResource ButtonStyleFermer}" Command="{Binding TerminerAction, Mode=OneWay}"/>
		</Border>
	</Grid>
</Window>